// Module
var MainModule;
(function (MainModule) {
    // Class
    var PersonBase = (function () {
        // Constructor
        function PersonBase(age, name) {
            this.age = age;
            this.name = name;
        }
        PersonBase.prototype.getDetails = function () {
            return this.name + ' ' + this.age;
        };
        return PersonBase;
    })();
    MainModule.PersonBase = PersonBase;
})(MainModule || (MainModule = {}));
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
// Module
var Shapes;
(function (Shapes) {
    // Class
    var Point = (function () {
        // Constructor
        function Point(x, y) {
            this.x = x;
            this.y = y;
        }
        // Instance member
        Point.prototype.getDist = function () {
            return Math.sqrt(this.x * this.x + this.y * this.y);
        };

        Point.origin = new Point(0, 0);
        return Point;
    })();
    Shapes.Point = Point;
})(Shapes || (Shapes = {}));

var PersonProcesser;
(function (PersonProcesser) {
    //derived class from  personBase
    var Person = (function (_super) {
        __extends(Person, _super);
        //Constructor
        function Person(age, name, addr) {
            _super.call(this, age, name);
            this.address = addr;
        }
        Person.prototype.getDetails = function () {
            return this.name + ' ' + this.age + ' ' + this.address;
        };
        return Person;
    })(MainModule.PersonBase);
    PersonProcesser.Person = Person;
})(PersonProcesser || (PersonProcesser = {}));

// Local variables
var p = new Shapes.Point(3, 4);
var dist = p.getDist();

// Local variables
var person = new PersonProcesser.Person(20, "abc", "abc street, xyz city");
var details = person.getDetails();
